//
//  Widgetlist.m
//  __PRODUCTNAME__
//
//  Created by LL.F on 16/08/30
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "Widgetlist.h"
#import "Widget_Data.h"

@implementation Widgetlist

+ (NSDictionary *)objectClassInArray{
    return @{@"widget_data" : [Widget_Data class]};
}
- (void)setValue:(id)value forKey:(NSString *)key
{

    [super setValue:value forKey:key];
    if ([key isEqualToString:@"widget_data"]) {
        NSMutableArray<Widget_Data *> *widget_dataArray = [NSMutableArray array];
        for (NSDictionary *widget_dataDic in value) {
            Widget_Data *widget_data = [Widget_Data modelWithDic:widget_dataDic];
            [widget_dataArray addObject:widget_data];
        }
        _widget_data = widget_dataArray;
    }
}
@end
